﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using System.Windows.Forms;
namespace QuanLiBongDa.DataAccessLayer
{
    class TraCuuCauThuDAO
    {
        public static TraCuuCauThuDAO CreatTraCuuDAO()
        {
            return new TraCuuCauThuDAO();
        }
        public void MaCT(ComboBox mact)
        {
            SqlDataReader dr = SQLService.mExecuteReader(SQLService.ReturnAll("CAUTHU"));
            while(dr.Read())
            {
                mact.Items.Add(dr["TenCT"]);
            }
        }
        public DataTable TraCuuCauThu(string str)
        {
            SqlParameter []par=new SqlParameter [1];
            par[0] = new SqlParameter("@tukhoa", str);
            return SQLService.FillTable("TraCuuCauThu", par);
        }
    }
}
